//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//

package test.actions.cardactions;

import com.megacrit.cardcrawl.actions.AbstractGameAction;
import com.megacrit.cardcrawl.actions.common.GainBlockAction;
import com.megacrit.cardcrawl.cards.AbstractCard;
import com.megacrit.cardcrawl.dungeons.AbstractDungeon;
import com.megacrit.cardcrawl.powers.AbstractPower;
import mutsumimod.powers.SkyBallDebuffPower;
import test.cards.BaseCaptainCard;
import test.monitors.SeaMonitor;

import java.util.ListIterator;

public class TargetBangDreamAction extends AbstractGameAction {

    public int seaIndex;

    public TargetBangDreamAction(int seaIndex) {
        this.seaIndex = seaIndex;
    }

    public void update() {
        int count=0;
        for(SeaMonitor.Sea sea : SeaMonitor.seaList) {
            if(sea.index>seaIndex&&sea.card!=null) {
                count++;
                if(sea.card instanceof BaseCaptainCard){
                    ((BaseCaptainCard) sea.card).triggerOnActivate();
                }
            }
        }
        addToTop(new GainBlockAction(AbstractDungeon.player,count));
        isDone = true;
    }
}
